﻿@model IEnumerable<JuniorProject.Models.Employee.HiringSpecialistAppModel>

@{
    ViewBag.Title = "SelectApplicant";
}

@section scripts
{
    <link href="@Url.Content("~/Content/themes/base/jquery-tablesorter.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.tablesorter.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('table').tablesorter({ headers: { 4: { sorter: false} }, sortList: [[0, 0]] });
        });
    </script>
}

<h2>Select Applicant - Job Posting #@ViewBag.PostingID</h2>
<h4>Click on an applicant to offer them this position.</h4>
<br />

<table id="table" class="tablesorter">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.PostingDate)
            </th>
            <th>
                Name
            </th>
            <th>
                @Html.DisplayNameFor(model => model.JobTitle)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.JobLocation)
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.PostingDate)
            </td>
            <td>
                @Html.ActionLink(item.FirstName + " " + item.LastName,
                            "HireConfirm", new { postingID = item.JobPostingID, appID = item.ID })
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.JobTitle)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.JobLocation)
            </td>
        </tr>
}
    </tbody>
</table>

<p>
    @Html.Partial("_EmployeeBottomNavBar", ViewData["AccessLevel"])
</p>